import { IPaginationQuery } from './common.type';

/**
 * 部门实体（响应）
 */
export interface IDept {
  id: string;
  code: string;
  name: string;
  parentId?: string | null;
  sort: number;
  leader?: string | null;
  phone?: string | null;
  email?: string | null;
  status: number;
  description?: string | null;
  createdAt?: string | null;
  updatedAt?: string | null;
}

/**
 * 部门树节点（响应）
 */
export interface IDeptTree extends IDept {
  children?: IDeptTree[];
}

/**
 * 创建部门请求
 */
export interface ICreateDept {
  code: string;
  name: string;
  parentId?: string;
  sort?: number;
  leader?: string;
  phone?: string;
  email?: string;
  status?: number;
  description?: string;
}

/**
 * 更新部门请求
 */
export interface IUpdateDept {
  code?: string;
  name?: string;
  parentId?: string;
  sort?: number;
  leader?: string;
  phone?: string;
  email?: string;
  status?: number;
  description?: string;
}

/**
 * 查询部门请求
 */
export interface IQueryDept extends IPaginationQuery {
  code?: string;
  name?: string;
  status?: number;
}
